﻿
#NOTE! Keep the trigger has_RelationToMe_relation updated when adding new relations to RelationToMe, needed for CharacterIntroduction loc
RelationToMe = {
	type = character

	text = {
		localization_key = relation_you
		trigger = { scope:second = root }
	}

	text = {
		localization_key = relation_motherwife
		trigger = {
			scope:second = {
				OR = {
					this = root.mother
					this = root.mother.mother
					this = root.father.mother
				}
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_mother_concubine
		trigger = {
			scope:second = {
				OR = {
					this = root.mother
					this = root.mother.mother
					this = root.father.mother
				}
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_sisterwife
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = yes
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_sister_concubine
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = yes
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_daughterwife
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = { any_parent = { this = root } }
				}
				is_female = yes
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_daughter_concubine
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = { any_parent = { this = root } }
				}
				any_consort = { this = root }
				is_female = yes
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_fatherhusband
		trigger = {
			scope:second = {
				OR = {
					this = root.father
					this = root.father.father
					this = root.mother.father
				}
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_father_consort
		trigger = {
			scope:second = {
				OR = {
					this = root.father
					this = root.father.father
					this = root.mother.father
				}
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_brotherhusband
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = no
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_brother_consort
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = no
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_sonhusband
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
				is_female = no
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_son_consort
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
				is_female = no
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_wife
		trigger = {
			any_spouse = {
				this = scope:second
			}
			scope:second = {
				is_female = yes
				is_alive = yes
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_husband
		trigger = {
			any_spouse = {
				this = scope:second
			}
			scope:second = {
				is_male = yes
				is_alive = yes
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_wife_departed
		trigger = {
			scope:second = {
				is_female = yes
				any_former_spouse = {
					this = root
				}
				is_alive = no
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_husband_departed
		trigger = {
			scope:second = {
				is_male = yes
				any_former_spouse = {
					this = root
				}
				is_alive = no
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_mother
		trigger = {
			scope:second = {
				is_female = yes
				any_child = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_father
		trigger = {
			scope:second = {
				is_female = no
				any_child = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_heir_daughter
		trigger = {
			player_heir ?= scope:second
			scope:second = {
				is_female = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_heir_son
		trigger = {
			player_heir ?= scope:second
			scope:second = {
				is_male = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_daughter
		trigger = {
			scope:second = {
				is_female = yes
				is_child_of = root
				exists = root.current_travel_plan
				root.current_travel_plan = {
					scope:second = { is_travel_leader = yes }
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_son
		trigger = {
			scope:second = {
				is_male = yes
				is_child_of = root
				exists = root.current_travel_plan
				root.current_travel_plan = {
					scope:second = { is_travel_leader = yes }
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_wife
		trigger = {
			scope:second = {
				is_spouse_of = root
				is_female = yes
				exists = root.current_travel_plan
				root.current_travel_plan = {
					scope:second = { is_travel_leader = yes }
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_husband
		trigger = {
			scope:second = {
				is_spouse_of = root
				is_male = yes
				exists = root.current_travel_plan
				root.current_travel_plan = {
					scope:second = { is_travel_leader = yes }
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_mother
		trigger = {
			scope:second = {
				is_spouse_of = root
				is_male = yes
				exists = root.current_travel_plan
				root.current_travel_plan = {
					scope:second = { is_travel_leader = yes }
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_father
		trigger = {
			scope:second = {
				is_spouse_of = root
				is_male = yes
				exists = root.current_travel_plan
				root.current_travel_plan = {
					scope:second = { is_travel_leader = yes }
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader
		trigger = {
			exists = root.current_travel_plan
			root.current_travel_plan = {
				scope:second = { is_travel_leader = yes }
			}
		}
	}

	text = {
		localization_key = relation_daughter
		trigger = {
			scope:second = {
				is_female = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_son
		trigger = {
			scope:second = {
				is_female = no
				is_child_of = root
			}
		}
	}
	
	text = {
		localization_key = relation_movement_leader
		trigger = {
			scope:second = {
				trigger_if = {
					limit = {
						any_character_situation = {
							situation_type = dynastic_cycle
						}
						government_has_flag = government_is_celestial
						root = { government_has_flag = government_is_celestial }
					}
				}
				is_any_movement_leader = yes
				top_participant_group:dynastic_cycle ?= root.top_participant_group:dynastic_cycle
			}
		}
	}

	text = {
		localization_key = relation_grandmother
		trigger = {
			scope:second = {
				is_female = yes
				is_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_grandfather
		trigger = {
			scope:second = {
				is_male = yes
				is_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_granddaughter
		trigger = {
			scope:second = {
				is_female = yes
				is_grandchild_of = root
			}
		}
	}

	text = {
		localization_key = relation_grandson
		trigger = {
			scope:second = {
				is_female = no
				is_grandchild_of = root
			}
		}
	}

	text = {
		localization_key = relation_half_sister
		trigger = {
			scope:second = {
				is_female = yes
				any_sibling = {
					this = root
				}
				any_parent = { NOT = { is_parent_of = root } }
			}
		}
	}

	text = {
		localization_key = relation_half_brother
		trigger = {
			scope:second = {
				is_female = no
				any_sibling = {
					this = root
				}
				any_parent = { NOT = { is_parent_of = root } }
			}
		}
	}

	text = {
		localization_key = relation_sister_nemesis
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = yes
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_rival
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = yes
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_nemesis
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = no
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_rival
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = no
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_best_friend
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = best_friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_friend
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_best_friend
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = best_friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_friend
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_bully
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = victim
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_bully
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = victim
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_victim
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = bully
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_victim
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = bully
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_of = root
			}
		}
	}

	text = {
		localization_key = relation_brother
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_of = root
			}
		}
	}

	text = {
		localization_key = relation_niece
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nephew
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_aunt
		trigger = {
			scope:second = {
				is_female = yes
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_uncle
		trigger = {
			scope:second = {
				is_female = no
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_hostage
		trigger = {
			scope:second = {
				is_hostage = yes
				warden ?= root
			}
		}
	}

	text = {
		localization_key = relation_warden
		trigger = {
			is_hostage = yes
			warden ?= scope:second
		}
	}

	text = {
		localization_key = relation_concubine_female
		trigger = {
			scope:second = {
				is_female = yes
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_concubine_male
		trigger = {
			scope:second = {
				is_male = yes
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_religious_head
		trigger = {
			faith.religious_head = scope:second
		}
	}

	text = {
		localization_key = relation_great_grandfather
		trigger = {
			scope:second = {
				is_male = yes
				is_great_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_great_grandmother
		trigger = {
			scope:second = {
				is_female = yes
				is_great_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_greatgranddaughter
		trigger = {
			scope:second = {
				is_female = yes
				is_great_grandchild_of = root
			}
		}
	}

	text = {
		localization_key = relation_greatgrandson
		trigger = {
			scope:second = {
				is_female = no
				is_great_grandchild_of = root
			}
		}
	}

	text = {
		localization_key = daughter_in_law
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					is_child_of = root
				}
			}
		}
	}

	text = {
		localization_key = son_in_law
		trigger = {
			scope:second = {
				is_female = no
				any_spouse = {
					is_child_of = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cousin
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_cousin_female
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_stepdaughter
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					any_spouse = {
						this = root
						NOT = { is_parent_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepson
		trigger = {
			scope:second = {
				is_male = yes
				any_parent = {
					any_spouse = {
						this = root
						NOT = { is_parent_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepsister
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					any_spouse = {
						any_child = {
							this = root
							NOT = { is_sibling_of = scope:second }
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepbrother
		trigger = {
			scope:second = {
				is_male = yes
				any_parent = {
					any_spouse = {
						any_child = {
							this = root
							NOT = { is_sibling_of = scope:second }
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepmother
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					any_child = {
						this = root
						NOT = { is_child_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepfather
		trigger = {
			scope:second = {
				is_male = yes
				any_spouse = {
					any_child = {
						this = root
						NOT = { is_child_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_female_soulmate
		trigger = {
			scope:second = {
				has_relation_soulmate = root
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_female_lover
		trigger = {
			scope:second = {
				has_relation_lover = root
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_soulmate
		trigger = {
			scope:second = {
				has_relation_soulmate = root
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_lover
		trigger = {
			scope:second = {
				has_relation_lover = root
				is_female = no
				any_vassal_or_below = {
					this = root
				}
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_soulmate_female
		trigger = {
			scope:second = {
				any_relation = {
					type = soulmate
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_lover_female
		trigger = {
			scope:second = {
				any_relation = {
					type = lover
					this = root
				}
				is_female = yes
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_soulmate_male
		trigger = {
			scope:second = {
				any_relation = {
					type = soulmate
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_lover_male
		trigger = {
			scope:second = {
				any_relation = {
					type = lover
					this = root
				}
				is_female = no
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_best_friend_female
		trigger = {
			scope:second = {
				has_relation_best_friend = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_friend_female
		trigger = {
			scope:second = {
				has_relation_friend = root
				NOT = { has_relation_best_friend = root }
				is_female = yes
			}
		}
	}	

	text = {
		localization_key = relation_best_friend_male
		trigger = {
			scope:second = {
				has_relation_best_friend = root
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_friend_male
		trigger = {
			scope:second = {
				has_relation_friend = root
				NOT = { has_relation_best_friend = root }
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_liege_female_nemesis
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_female_rival
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_nemesis
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_rival
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_vassal_female_nemesis
		trigger = {
			scope:second = {
				is_female = yes
				has_relation_nemesis = root				
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_female_rival
		trigger = {
			scope:second = {
				is_female = yes
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }			
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_male_nemesis
		trigger = {
			scope:second = {
				is_female = no
				has_relation_nemesis = root				
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_male_rival
		trigger = {
			scope:second = {
				is_female = no
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }			
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_nemesis_female
		trigger = {
			scope:second = {
				any_relation = {
					type = nemesis
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_rival_female
		trigger = {
			scope:second = {
				any_relation = {
					type = rival
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_nemesis_male
		trigger = {
			scope:second = {
				any_relation = {
					type = nemesis
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_rival_male
		trigger = {
			scope:second = {
				any_relation = {
					type = rival
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_crush
		trigger = {
			any_relation = {
				type = crush
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_bully
		trigger = {
			scope:second = {
				any_relation = {
					type = victim
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_victim
		trigger = {
			scope:second = {
				any_relation = {
					type = bully
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_ward
		trigger = {
			scope:second = {
				any_relation = {
					type = guardian
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_guardian
		trigger = {
			scope:second = {
				any_relation = {
					type = ward
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_disciple
		trigger = {
			scope:second = {
				any_relation = {
					type = elder
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_elder
		trigger = {
			scope:second = {
				any_relation = {
					type = disciple
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_foe
		trigger = {
			scope:second = {
				is_at_war_with = root
			}
		}
	}

	text = { #intrigue-mentor
		localization_key = relation_mentor
		trigger = {
			scope:second = {
				any_relation = {
					type = intrigue_student
					this = root
				}
			}
		}
	}

	text = { #intrigue-mentor
		localization_key = relation_student
		trigger = {
			scope:second = {
				any_relation = {
					type = intrigue_mentor
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_mentor
		trigger = {
			scope:second = {
				any_relation = {
					type = student
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_student
		trigger = {
			scope:second = {
				any_relation = {
					type = mentor
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sisterinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_brotherinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_cousininlaw_female
		trigger = {
			scope:second = {
				is_female = yes
				is_cousin_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_cousininlaw_male
		trigger = {
			scope:second = {
				is_female = no
				is_cousin_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_auntinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_auntuncle_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_uncleinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_auntuncle_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandmotherinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandfatherinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandmotherinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_great_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandfatherinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_great_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_granddaughterinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandsoninlaw
		trigger = {
			scope:second = {
				is_female = no
				is_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_granddaughterinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_great_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandsoninlaw
		trigger = {
			scope:second = {
				is_female = no
				is_great_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nieceinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_nibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nephewinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_nibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_ceremonial_liege_female
		trigger = {
			scope:second = {
				is_female = yes
				top_liege = root.top_liege
				tgp_is_ceremonial_liege_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_ceremonial_liege_male
		trigger = {
			scope:second = {
				is_female = no
				top_liege = root.top_liege
				tgp_is_ceremonial_liege_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_liege_female
		trigger = {
			scope:second = {
				is_female = yes
				OR = {
					any_vassal_or_below = {
						this = root
					}
					any_courtier = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male
		trigger = {
			scope:second = {
				is_female = no
				OR = {
					any_vassal_or_below = {
						this = root
					}
					any_courtier = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_suzerain
		trigger = {
			scope:second = {
				any_tributary = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_councillor_female
		trigger = {
			scope:second = {
				is_female = yes			
				is_councillor_of = root
			}
		}
	}

	text = {
		localization_key = relation_councillor_male
		trigger = {
			scope:second = {
				is_female = no				
				is_councillor_of = root
			}
		}
	}

	text = {
		localization_key = relation_court_physician_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_physician_court_position
				is_court_position_employer = {
					court_position = court_physician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_physician_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_physician_court_position
				is_court_position_employer = {
					court_position = court_physician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_keeper_of_swans_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = keeper_of_swans_court_position
				is_court_position_employer = {
					court_position = keeper_of_swans_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_keeper_of_swans_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = keeper_of_swans_court_position
				is_court_position_employer = {
					court_position = keeper_of_swans_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = travel_leader_court_position
				is_court_position_employer = {
					court_position = travel_leader_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = travel_leader_court_position
				is_court_position_employer = {
					court_position = travel_leader_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_horse_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = master_of_horse_court_position
				is_court_position_employer = {
					court_position = master_of_horse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_horse_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = master_of_horse_court_position
				is_court_position_employer = {
					court_position = master_of_horse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_jester_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_jester_court_position
				is_court_position_employer = {
					court_position = court_jester_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_jester_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_jester_court_position
				is_court_position_employer = {
					court_position = court_jester_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_hunt_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = master_of_hunt_court_position
				is_court_position_employer = {
					court_position = master_of_hunt_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_hunt_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = master_of_hunt_court_position
				is_court_position_employer = {
					court_position = master_of_hunt_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_high_almoner_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = high_almoner_court_position
				is_court_position_employer = {
					court_position = high_almoner_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_high_almoner_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = high_almoner_court_position
				is_court_position_employer = {
					court_position = high_almoner_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cupbearer_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = cupbearer_court_position
				is_court_position_employer = {
					court_position = cupbearer_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cupbearer_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = cupbearer_court_position
				is_court_position_employer = {
					court_position = cupbearer_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_seneschal_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = seneschal_court_position
				is_court_position_employer = {
					court_position = seneschal_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_seneschal_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = seneschal_court_position
				is_court_position_employer = {
					court_position = seneschal_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_antiquarian_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = antiquarian_court_position
				is_court_position_employer = {
					court_position = antiquarian_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_antiquarian_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = antiquarian_court_position
				is_court_position_employer = {
					court_position = antiquarian_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_tutor_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_tutor_court_position
				is_court_position_employer = {
					court_position = court_tutor_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_tutor_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_tutor_court_position
				is_court_position_employer = {
					court_position = court_tutor_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_royal_architect_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = royal_architect_court_position
				is_court_position_employer = {
					court_position = royal_architect_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_royal_architect_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = royal_architect_court_position
				is_court_position_employer = {
					court_position = royal_architect_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_poet_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_poet_court_position
				is_court_position_employer = {
					court_position = court_poet_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_poet_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_poet_court_position
				is_court_position_employer = {
					court_position = court_poet_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_bodyguard_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = bodyguard_court_position
				is_court_position_employer = {
					court_position = bodyguard_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_bodyguard_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = bodyguard_court_position
				is_court_position_employer = {
					court_position = bodyguard_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_champion_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = champion_court_position
				is_court_position_employer = {
					court_position = champion_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_champion_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = champion_court_position
				is_court_position_employer = {
					court_position = champion_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_musician_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_musician_court_position
				is_court_position_employer = {
					court_position = court_musician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_musician_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_musician_court_position
				is_court_position_employer = {
					court_position = court_musician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_food_taster_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = food_taster_court_position
				is_court_position_employer = {
					court_position = food_taster_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_food_taster_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = food_taster_court_position
				is_court_position_employer = {
					court_position = food_taster_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_lady_in_waiting_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = lady_in_waiting_court_position
				is_court_position_employer = {
					court_position = lady_in_waiting_court_position
					who = root
				}
			}
		}
	}

	text = { #Shouldn't happen, but who knows ¯\_(ツ)_/¯
		localization_key = relation_lady_in_waiting_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = lady_in_waiting_court_position
				is_court_position_employer = {
					court_position = lady_in_waiting_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_garuda_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = garuda_court_position
				is_court_position_employer = {
					court_position = garuda_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_garuda_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = garuda_court_position
				is_court_position_employer = {
					court_position = garuda_court_position
					who = root
				}
			}
		}
	}

	text = { #Shouldn't happen, but who knows ¯\_(ツ)_/¯
		localization_key = relation_chief_eunuch_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = chief_eunuch_court_position
				is_court_position_employer = {
					court_position = chief_eunuch_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_chief_eunuch_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = chief_eunuch_court_position
				is_court_position_employer = {
					court_position = chief_eunuch_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_gardener_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_gardener_court_position
				is_court_position_employer = {
					court_position = court_gardener_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_gardener_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_gardener_court_position
				is_court_position_employer = {
					court_position = court_gardener_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_chief_qadi_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = chief_qadi_court_position
				is_court_position_employer = {
					court_position = chief_qadi_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_chief_qadi_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = chief_qadi_court_position
				is_court_position_employer = {
					court_position = chief_qadi_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_wet_nurse_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = wet_nurse_court_position
				is_court_position_employer = {
					court_position = wet_nurse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_akolouthos_male
		trigger = {
			scope:second = { is_male = yes }
			has_court_position = akolouthos_court_position
			is_court_position_employer = {
		        court_position = akolouthos_court_position
		        who = root
		    }
		}
	}

	text = {
		localization_key = relation_akolouthos_female
		trigger = {
			scope:second = { is_female = yes }
			has_court_position = akolouthos_court_position
			is_court_position_employer = {
		        court_position = akolouthos_court_position
		        who = root
		    }
		}
	}

	text = {
		localization_key = relation_court_astrologer_male
		trigger = {
			scope:second = { is_male = yes }
			has_court_position = court_astrologer_court_position
			is_court_position_employer = {
		        court_position = court_astrologer_court_position
		        who = root
		    }
		}
	}
	
	text = {
		localization_key = relation_court_astrologer_female
		trigger = {
			scope:second = { is_female = yes }
			has_court_position = court_astrologer_court_position
			is_court_position_employer = {
		        court_position = court_astrologer_court_position
		        who = root
		    }
		}
	}

	text = { #Shouldn't happen, but who knows ¯\_(ツ)_/¯
		localization_key = relation_wet_nurse_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = wet_nurse_court_position
				is_court_position_employer = {
					court_position = wet_nurse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_vassal_female
		trigger = {
			scope:second = {
				is_female = yes			
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_male
		trigger = {
			scope:second = {
				is_female = no				
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_subject_female
		trigger = {
			scope:second = {
				is_female = yes
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
			top_liege = {
				has_government = celestial_government
			}
		}
	}

	text = {
		localization_key = relation_fellow_subject_male
		trigger = {
			scope:second = {
				is_female = no
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
			top_liege = {
				has_government = celestial_government
			}
		}
	}

	text = {
		localization_key = relation_fellow_vassal_female
		trigger = {
			scope:second = {
				is_female = yes
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_fellow_vassal_male
		trigger = {
			scope:second = {
				is_female = no
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_knight
		trigger = {
			scope:second = { is_knight_of = root }
		}
	}

	text = {
		localization_key = relation_ally
		trigger = {
			scope:second = {
				is_allied_to = root
			}
		}
	}

	text = {
		localization_key = relation_kinswoman
		trigger = {
			scope:second = {
				is_female = yes
				is_lowborn = no
			}
			scope:second.dynasty = root.dynasty
		}
	}

	text = {
		localization_key = relation_kinsman
		trigger = {
			scope:second = {
				is_male = yes
				is_lowborn = no
			}
			scope:second.dynasty = root.dynasty
		}
	}

	text = {
		localization_key = relation_inspired_character_female
		trigger = {
			scope:second = {
				is_courtier_of = root
				OR = {
					AND = {
						inspiration ?= {
							inspiration_sponsor = { this = root }
						}
					}
					AND = {
						exists = var:created_artifact_for
						var:created_artifact_for = root
					}
				}
				is_female = yes
			}
		}
	}
	text = {
		localization_key = relation_inspired_character_male
		trigger = {
			scope:second = {
				is_courtier_of = root
				OR = {
					AND = {
						inspiration ?= {
							inspiration_sponsor = { this = root }
						}
					}
					AND = {
						exists = var:created_artifact_for
						var:created_artifact_for = root
					}
				}
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_follower_female
		trigger = {
			is_landed_or_landless_administrative = no
			scope:second = {
				is_courtier_of = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_follower_male
		trigger = {
			is_landed_or_landless_administrative = no
			scope:second = {
				is_courtier_of = root
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_courtier_female
		trigger = {
			is_landed_or_landless_administrative = yes
			scope:second = {
				is_courtier_of = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_courtier_male
		trigger = {
			is_landed_or_landless_administrative = yes
			scope:second = {
				is_courtier_of = root
				is_male = yes
			}
		}
	}

	text = {
		localization_key = follower_female
		trigger = {
			has_government = landless_adventurer_government
			scope:second = {
				is_courtier_of = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = follower_male
		trigger = {
			has_government = landless_adventurer_government
			scope:second = {
				is_courtier_of = root
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_peasant_affair_female
		trigger = {
			any_owned_story = {
				type = story_peasant_affair
				var:peasant_character = {
					this = scope:second
					is_female = yes
				}
			}
		}
	}

	text = {
		localization_key = relation_peasant_affair_male
		trigger = {
			any_owned_story = {
				type = story_peasant_affair
				var:peasant_character = {
					this = scope:second
					is_male = yes
				}
			}
		}
	}

	text = {
		localization_key = relation_agent
		trigger = {
			any_scheme = {
				scheme_is_character_agent = scope:second
			}
		}
	}

	text = {
		localization_key = relation_host_female
		trigger = {
			host ?= scope:second
			scope:second = { is_female = yes }
		}
	}

	text = {
		localization_key = relation_host_male
		trigger = {
			host ?= scope:second
			scope:second = { is_male = yes }
		}
	}

	text = {
		localization_key = relation_prisoner_female
		trigger = {
			scope:second = {
				is_female = yes
				is_imprisoned_by = root
			}
		}
	}

	text = {
		localization_key = relation_prisoner_male
		trigger = {
			scope:second = {
				is_male = yes
				is_imprisoned_by = root
			}
		}
	}

	text = {
		localization_key = relation_jailer_female
		trigger = {
			is_imprisoned_by = scope:second
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_jailer_male
		trigger = {
			is_imprisoned_by = scope:second
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_guest_female
		trigger = {
			scope:second = {
				is_female = yes
				host ?= root
			}
		}
	}

	text = {
		localization_key = relation_guest_male
		trigger = {
			scope:second = {
				is_male = yes
				host ?= root
			}
		}
	}

	text = {
		localization_key = relation_old_foe_female
		trigger = {
			root = {
				any_memory = {
					OR = {
						has_memory_type = war_won
						has_memory_type = war_lost
					}
					any_memory_participant = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_old_foe_male
		trigger = {
			root = {
				any_memory = {
					OR = {
						has_memory_type = war_won
						has_memory_type = war_lost
					}
					any_memory_participant = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_pilgrim_female
		trigger = {
			root = {
				current_travel_plan ?= {
					travel_leader.involved_activity ?= {
						has_activity_type = activity_pilgrimage
					}
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_pilgrim_male
		trigger = {
			root = {
				current_travel_plan ?= {
					travel_leader.involved_activity ?= {
						has_activity_type = activity_pilgrimage
					}
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_traveler_female
		trigger = {
			root = {
				current_travel_plan ?= {
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_traveler_male
		trigger = {
			root = {
				current_travel_plan ?= {
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_contestant_female
		trigger = {
			involved_activity ?= {
				has_activity_type = activity_tournament
				any_guest_subset_current_phase = { #you're participating
					name = contestant
					this = root
				}
				any_guest_subset_current_phase = { #they are participating
					name = contestant
					this = scope:second
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_contestant_male
		trigger = {
			involved_activity ?= {
				has_activity_type = activity_tournament
				any_guest_subset_current_phase = { #you're participating
					name = contestant
					this = root
				}
				any_guest_subset_current_phase = { #they are participating
					name = contestant
					this = scope:second
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_attendee_female
		trigger = {
			involved_activity ?= {
				has_activity_type = activity_tournament
				any_attending_character = { this = scope:second }
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_attendee_male
		trigger = {
			involved_activity ?= {
				has_activity_type = activity_tournament
				any_attending_character = { this = scope:second }
			}
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_acquaintance_female
		trigger = {
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_acquaintance_male
		trigger = {
			scope:second = {
				is_male = yes
			}
		}
	}
}

RelationToMePossessive = {
	type = character

	text = {
		localization_key = CHARACTER_NAME_MY
		trigger = { scope:second = root }
	}

	text = {
		localization_key = relation_motherwife_possessive
		trigger = {
			scope:second = {
				OR = {
					this = root.mother
					this = root.mother.mother
					this = root.father.mother
				}
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_mother_concubine_possessive
		trigger = {
			scope:second = {
				OR = {
					this = root.mother
					this = root.mother.mother
					this = root.father.mother
				}
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_sisterwife_possessive
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = yes
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_sister_concubine_possessive
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = yes
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_daughterwife_possessive
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = { any_parent = { this = root } }
				}
				is_female = yes
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_daughter_concubine_possessive
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = { any_parent = { this = root } }
				}
				any_consort = { this = root }
				is_female = yes
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_fatherhusband_possessive
		trigger = {
			scope:second = {
				OR = {
					this = root.father
					this = root.father.father
					this = root.mother.father
				}
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_father_consort_possessive
		trigger = {
			scope:second = {
				OR = {
					this = root.father
					this = root.father.father
					this = root.mother.father
				}
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_brotherhusband_possessive
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = no
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_brother_consort_possessive
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = no
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_sonhusband_possessive
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
				is_female = no
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_son_consort_possessive
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
				is_female = no
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_wife_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					even_if_dead = yes
					this = root
				}
				is_alive = yes
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_husband_possessive
		trigger = {
			scope:second = {
				is_male = yes
				any_spouse = {
					even_if_dead = yes
					this = root
				}
				is_alive = yes
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_wife_departed_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					even_if_dead = yes
					this = root
				}
				is_alive = no
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_husband_departed_possessive
		trigger = {
			scope:second = {
				is_male = yes
				any_spouse = {
					even_if_dead = yes
					this = root
				}
				is_alive = no
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_mother_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_child = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_father_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_child = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_heir_daughter_possessive
		trigger = {
			player_heir ?= scope:second
			scope:second = {
				is_female = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_heir_son_possessive
		trigger = {
			player_heir ?= scope:second
			scope:second = {
				is_female = no
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_daughter_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_son_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_half_sister_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_sibling = {
					this = root
				}
				OR = {
					AND = {
						mother ?= { any_child = { this != root } }
					}
					AND = {
						father ?= { any_child = { this != root } }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_half_brother_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_sibling = {
					this = root
				}
				OR = {
					AND = {
						mother ?= { any_child = { this != root } }
					}
					AND = {
						father ?= { any_child = { this != root } }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_nemesis_possessive
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = yes
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_rival_possessive
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = yes
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_nemesis_possessive
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = no
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_rival_possessive
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = no
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_best_friend_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = best_friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_friend_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_best_friend_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = best_friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_friend_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = friend
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_bully_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = victim
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_bully_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = victim
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_victim_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_relation = {
					type = bully
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_victim_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_relation = {
					type = bully
					this = root
				}
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sister_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_granddaughter_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					even_if_dead = yes
					any_parent = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_grandson_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_parent = {
					even_if_dead = yes
					any_parent = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_niece_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nephew_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_aunt_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_uncle_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_hostage_possessive
		trigger = {
			scope:second = {
				is_hostage = yes
				warden ?= root
			}
		}
	}

	text = {
		localization_key = relation_warden_possessive
		trigger = {
			is_hostage = yes
			warden ?= scope:second
		}
	}

	text = {
		localization_key = relation_concubine_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_concubine_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				any_spouse = { this = root }
				is_concubine = yes
			}
		}
	}

	text = { #Both grandparents and great grandparents
		localization_key = relation_grandmother_possessive
		trigger = {
			scope:second = {
				is_female = yes
				OR = {
					any_child = {
						even_if_dead = yes
						any_child = {
							this = root
						}
					}
					any_child = {
						even_if_dead = yes
						any_child = {
							even_if_dead = yes
							any_child = {
								this = root
							}
						}
					}
				}
			}
		}
	}

	text = { #Both grandparents and great grandparents
		localization_key = relation_grandfather_possessive
		trigger = {
			scope:second = {
				is_female = no
				OR = {
					any_child = {
						even_if_dead = yes
						any_child = {
							this = root
						}
					}
					any_child = {
						even_if_dead = yes
						any_child = {
							even_if_dead = yes
							any_child = {
								this = root
							}
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_religious_head_possessive
		trigger = {
			faith.religious_head = scope:second
		}
	}

	text = {
		localization_key = relation_greatgranddaughter_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					even_if_dead = yes
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_greatgrandson_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_parent = {
					even_if_dead = yes
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepdaughter_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					any_spouse = {
						this = root
						NOT = { is_parent_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepson_possessive
		trigger = {
			scope:second = {
				is_male = yes
				any_parent = {
					any_spouse = {
						this = root
						NOT = { is_parent_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepsister_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					any_spouse = {
						any_child = {
							this = root
							NOT = { is_sibling_of = scope:second }
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepbrother_possessive
		trigger = {
			scope:second = {
				is_male = yes
				any_parent = {
					any_spouse = {
						any_child = {
							this = root
							NOT = { is_sibling_of = scope:second }
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepmother_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					any_child = {
						this = root
						NOT = { is_child_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepfather_possessive
		trigger = {
			scope:second = {
				is_male = yes
				any_spouse = {
					any_child = {
						this = root
						NOT = { is_child_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = daughter_in_law_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					is_child_of = root
				}
			}
		}
	}

	text = {
		localization_key = son_in_law_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_spouse = {
					is_child_of = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_female_lover_possessive
		trigger = {
			scope:second = {
				has_relation_lover = root
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_female_soulmate_possessive
		trigger = {
			scope:second = {
				has_relation_soulmate = root
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_lover_possessive
		trigger = {
			scope:second = {
				has_relation_lover = root
				is_female = no
				any_vassal_or_below = {
					this = root
				}
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_soulmate_possessive
		trigger = {
			scope:second = {
				has_relation_soulmate = root
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_lover_female_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = lover
					this = root
				}
				is_female = yes
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_soulmate_female_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = soulmate
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_lover_male_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = lover
					this = root
				}
				is_female = no
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_soulmate_male_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = soulmate
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_friend_female_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = friend
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_best_friend_female_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = best_friend
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_friend_male_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = friend
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_best_friend_male_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = best_friend
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_liege_female_nemesis_possessive
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_female_rival_possessive
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_nemesis_possessive
		trigger = {
			scope:second = {
				has_relation_nemesis = root
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_rival_possessive
		trigger = {
			scope:second = {
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_vassal_female_nemesis_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_relation_nemesis = root				
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_female_rival_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }		
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_fellow_vassal_female_nemesis_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_relation_nemesis = root	
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_fellow_vassal_female_rival_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_vassal_male_nemesis_possessive
		trigger = {
			scope:second = {
				is_female = no
				has_relation_nemesis = root				
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_male_rival_possessive
		trigger = {
			scope:second = {
				is_female = no
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }	
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_fellow_vassal_male_nemesis_possessive
		trigger = {
			scope:second = {
				is_female = no
				has_relation_nemesis = root
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_fellow_vassal_male_rival_possessive
		trigger = {
			scope:second = {
				is_female = no
				has_relation_rival = root
				NOT = { has_relation_nemesis = root }	
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_nemesis_female_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = nemesis
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_rival_female_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = rival
					this = root
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_nemesis_male_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = nemesis
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_rival_male_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = rival
					this = root
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_crush_possessive
		trigger = {
			any_relation = {
				type = crush
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_bully_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = victim
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_victim_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = bully
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_ward_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = guardian
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_guardian_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = ward
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_disciple_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = elder
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_elder_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = disciple
					this = root
				}
			}
		}
	}

	text = { #intrigue-mentor
		localization_key = relation_mentor_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = intrigue_student
					this = root
				}
			}
		}
	}

	text = { #intrigue-mentor
		localization_key = relation_student_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = intrigue_mentor
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_mentor_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = student
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_student_possessive
		trigger = {
			scope:second = {
				any_relation = {
					type = mentor
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cousin_possessive
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_cousin_female_possessive
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_sisterinlaw_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_brotherinlaw_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_cousininlaw_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_cousin_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_cousininlaw_male_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_cousin_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_auntinlaw_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_auntuncle_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_uncleinlaw_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_auntuncle_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandmotherinlaw_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandfatherinlaw_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandmotherinlaw_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_great_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandfatherinlaw_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_great_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_granddaughterinlaw_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandsoninlaw_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_granddaughterinlaw_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_great_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandsoninlaw_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_great_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nieceinlaw_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_nibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nephewinlaw_possessive
		trigger = {
			scope:second = {
				is_female = no
				is_nibling_in_law_of_root_trigger = yes
			}
		}
	}
	text = {
		localization_key = relation_ceremonial_liege_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				top_liege = root.top_liege
				tgp_is_ceremonial_liege_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_ceremonial_liege_male_possessive
		trigger = {
			scope:second = {
				is_female = no
				top_liege = root.top_liege
				tgp_is_ceremonial_liege_trigger = yes
			}
		}
	}
	text = {
		localization_key = relation_liege_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male_possessive
		trigger = {
			scope:second = {
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_vassal_female_possessive
		trigger = {
			scope:second = {
				is_female = yes			
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_male_possessive
		trigger = {
			scope:second = {
				is_female = no				
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_fellow_vassal_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				top_liege != this
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_fellow_vassal_male_possessive
		trigger = {
			scope:second = {
				is_female = no
				top_liege != this			
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_councillor_female_possessive
		trigger = {
			scope:second = {
				is_female = yes			
				is_councillor_of = root
			}
		}
	}

	text = {
		localization_key = relation_councillor_male_possessive
		trigger = {
			scope:second = {
				is_female = no				
				is_councillor_of = root
			}
		}
	}

	text = {
		localization_key = relation_court_physician_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_physician_court_position
				is_court_position_employer = {
					court_position = court_physician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_physician_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_physician_court_position
				is_court_position_employer = {
					court_position = court_physician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_keeper_of_swans_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = keeper_of_swans_court_position
				is_court_position_employer = {
					court_position = keeper_of_swans_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_keeper_of_swans_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = keeper_of_swans_court_position
				is_court_position_employer = {
					court_position = keeper_of_swans_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = travel_leader_court_position
				is_court_position_employer = {
					court_position = travel_leader_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = travel_leader_court_position
				is_court_position_employer = {
					court_position = travel_leader_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_horse_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = master_of_horse_court_position
				is_court_position_employer = {
					court_position = master_of_horse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_horse_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = master_of_horse_court_position
				is_court_position_employer = {
					court_position = master_of_horse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_jester_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_jester_court_position
				is_court_position_employer = {
					court_position = court_jester_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_jester_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_jester_court_position
				is_court_position_employer = {
					court_position = court_jester_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_hunt_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = master_of_hunt_court_position
				is_court_position_employer = {
					court_position = master_of_hunt_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_hunt_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = master_of_hunt_court_position
				is_court_position_employer = {
					court_position = master_of_hunt_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_high_almoner_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = high_almoner_court_position
				is_court_position_employer = {
					court_position = high_almoner_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_high_almoner_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = high_almoner_court_position
				is_court_position_employer = {
					court_position = high_almoner_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cupbearer_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = cupbearer_court_position
				is_court_position_employer = {
					court_position = cupbearer_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cupbearer_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = cupbearer_court_position
				is_court_position_employer = {
					court_position = cupbearer_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_seneschal_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = seneschal_court_position
				is_court_position_employer = {
					court_position = seneschal_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_seneschal_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = seneschal_court_position
				is_court_position_employer = {
					court_position = seneschal_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_antiquarian_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = antiquarian_court_position
				is_court_position_employer = {
					court_position = antiquarian_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_antiquarian_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = antiquarian_court_position
				is_court_position_employer = {
					court_position = antiquarian_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_tutor_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_tutor_court_position
				is_court_position_employer = {
					court_position = court_tutor_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_tutor_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_tutor_court_position
				is_court_position_employer = {
					court_position = court_tutor_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_royal_architect_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = royal_architect_court_position
				is_court_position_employer = {
					court_position = royal_architect_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_royal_architect_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = royal_architect_court_position
				is_court_position_employer = {
					court_position = royal_architect_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_poet_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_poet_court_position
				is_court_position_employer = {
					court_position = court_poet_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_poet_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_poet_court_position
				is_court_position_employer = {
					court_position = court_poet_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_bodyguard_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = bodyguard_court_position
				is_court_position_employer = {
					court_position = bodyguard_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_bodyguard_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = bodyguard_court_position
				is_court_position_employer = {
					court_position = bodyguard_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_champion_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = champion_court_position
				is_court_position_employer = {
					court_position = champion_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_champion_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = champion_court_position
				is_court_position_employer = {
					court_position = champion_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_musician_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_musician_court_position
				is_court_position_employer = {
					court_position = court_musician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_musician_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_musician_court_position
				is_court_position_employer = {
					court_position = court_musician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_food_taster_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = food_taster_court_position
				is_court_position_employer = {
					court_position = food_taster_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_food_taster_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = food_taster_court_position
				is_court_position_employer = {
					court_position = food_taster_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_lady_in_waiting_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = lady_in_waiting_court_position
				is_court_position_employer = {
					court_position = lady_in_waiting_court_position
					who = root
				}
			}
		}
	}

	text = { #Shouldn't happen, but who knows ¯\_(ツ)_/¯
		localization_key = relation_lady_in_waiting_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = lady_in_waiting_court_position
				is_court_position_employer = {
					court_position = lady_in_waiting_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_garuda_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = garuda_court_position
				is_court_position_employer = {
					court_position = garuda_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_garuda_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = garuda_court_position
				is_court_position_employer = {
					court_position = garuda_court_position
					who = root
				}
			}
		}
	}

	text = { #Shouldn't happen, but who knows ¯\_(ツ)_/¯
		localization_key = relation_chief_eunuch_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = chief_eunuch_court_position
				is_court_position_employer = {
					court_position = chief_eunuch_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_chief_eunuch_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = chief_eunuch_court_position
				is_court_position_employer = {
					court_position = chief_eunuch_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_gardener_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_gardener_court_position
				is_court_position_employer = {
					court_position = court_gardener_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_gardener_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_gardener_court_position
				is_court_position_employer = {
					court_position = court_gardener_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_chief_qadi_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = chief_qadi_court_position
				is_court_position_employer = {
					court_position = chief_qadi_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_chief_qadi_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = chief_qadi_court_position
				is_court_position_employer = {
					court_position = chief_qadi_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_wet_nurse_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = wet_nurse_court_position
				is_court_position_employer = {
					court_position = wet_nurse_court_position
					who = root
				}
			}
		}
	}

	text = { #Shouldn't happen, but who knows ¯\_(ツ)_/¯
		localization_key = relation_wet_nurse_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = wet_nurse_court_position
				is_court_position_employer = {
					court_position = wet_nurse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_akolouthos_male_possessive
		trigger = {
			scope:second = { is_male = yes }
			has_court_position = akolouthos_court_position
			is_court_position_employer = {
		        court_position = akolouthos_court_position
		        who = root
		    }
		}
	}

	text = {
		localization_key = relation_akolouthos_female_possessive
		trigger = {
			scope:second = { is_female = yes }
			has_court_position = akolouthos_court_position
			is_court_position_employer = {
		        court_position = akolouthos_court_position
		        who = root
		    }
		}
	}
	
	text = {
		localization_key = relation_court_astrologer_male_possessive
		trigger = {
			scope:second = { is_male = yes }
			has_court_position = court_astrologer_court_position
			is_court_position_employer = {
		        court_position = court_astrologer_court_position
		        who = root
		    }
		}
	}
	
	text = {
		localization_key = relation_court_astrologer_female_possessive
		trigger = {
			scope:second = { is_female = yes }
			has_court_position = court_astrologer_court_position
			is_court_position_employer = {
		        court_position = court_astrologer_court_position
		        who = root
		    }
		}
	}

	text = {
		localization_key = relation_kinswoman_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_lowborn = no
			}
			scope:second.dynasty = root.dynasty
		}
	}

	text = {
		localization_key = relation_kinsman_possessive
		trigger = {
			scope:second = {
				is_male = yes
				is_lowborn = no
			}
			scope:second.dynasty = root.dynasty
		}
	}

	text = {
		localization_key = relation_follower_female_possessive
		trigger = {
			is_landed_or_landless_administrative = yes
			scope:second = {
				is_courtier_of = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_follower_male_possessive
		trigger = {
			is_landed_or_landless_administrative = yes
			scope:second = {
				is_courtier_of = root
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_courtier_female_possessive
		trigger = {
			scope:second = {
				is_courtier_of = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_courtier_male_possessive
		trigger = {
			scope:second = {
				is_courtier_of = root
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_peasant_affair_female_possessive
		trigger = {
			any_owned_story = {
				type = story_peasant_affair
				var:peasant_character = {
					this = scope:second
					is_female = yes
				}
			}
		}
	}

	text = {
		localization_key = relation_peasant_affair_male_possessive
		trigger = {
			any_owned_story = {
				type = story_peasant_affair
				var:peasant_character = {
					this = scope:second
					is_male = yes
				}
			}
		}
	}

	text = {
		localization_key = relation_agent_possessive
		trigger = {
			any_scheme = {
				scheme_is_character_agent = scope:second
			}
		}
	}

	text = {
		localization_key = relation_prisoner_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				is_imprisoned_by = root
			}
		}
	}

	text = {
		localization_key = relation_prisoner_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				is_imprisoned_by = root
			}
		}
	}

	text = {
		localization_key = relation_jailer_female_possessive
		trigger = {
			is_imprisoned_by = scope:second
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_jailer_male_possessive
		trigger = {
			is_imprisoned_by = scope:second
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_host_female_possessive
		trigger = {
			host ?= scope:second
			scope:second = { is_female = yes }
		}
	}

	text = {
		localization_key = relation_host_male_possessive
		trigger = {
			host ?= scope:second
			scope:second = { is_male = yes }
		}
	}

	text = {
		localization_key = relation_guest_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
				host ?= root
			}
		}
	}

	text = {
		localization_key = relation_guest_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
				host ?= root
			}
		}
	}
	
	text = {
		localization_key = relation_old_foe_female_possessive
		trigger = {
			root = {
				any_memory = {
					OR = {
						has_memory_type = war_won
						has_memory_type = war_lost
					}
					any_memory_participant = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_old_foe_male_possessive
		trigger = {
			root = {
				any_memory = {
					OR = {
						has_memory_type = war_won
						has_memory_type = war_lost
					}
					any_memory_participant = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_pilgrim_female_possessive
		trigger = {
			root = {
				current_travel_plan ?= {
					travel_leader.involved_activity ?= {
						has_activity_type = activity_pilgrimage
					}
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_pilgrim_male_possessive
		trigger = {
			root = {
				current_travel_plan ?= {
					travel_leader.involved_activity ?= {
						has_activity_type = activity_pilgrimage
					}
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_traveler_female_possessive
		trigger = {
			root = {
				current_travel_plan ?= {
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_traveler_male_possessive
		trigger = {
			root = {
				current_travel_plan ?= {
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_contestant_female_possessive
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_guest_subset_current_phase = { #you're participating
						name = contestant
						this = root
					}
					any_guest_subset_current_phase = { #they are participating
						name = contestant
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_contestant_male_possessive
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_guest_subset_current_phase = { #you're participating
						name = contestant
						this = root
					}
					any_guest_subset_current_phase = { #they are participating
						name = contestant
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_attendee_female_possessive
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_attending_character = { this = scope:second }
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_attendee_male_possessive
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_attending_character = { this = scope:second }
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_acquaintance_female_possessive
		trigger = {
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_acquaintance_male_possessive
		trigger = {
			scope:second = {
				is_male = yes
			}
		}
	}
}


RelationToMeShort = {
	type = character

	text = {
		localization_key = relation_you
		trigger = { scope:second = root }
	}
	
	text = {
		localization_key = relation_motherwife
		trigger = {
			scope:second = {
				OR = {
					this = root.mother
					this = root.mother.mother
					this = root.father.mother
				}
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_mother_concubine
		trigger = {
			scope:second = {
				OR = {
					this = root.mother
					this = root.mother.mother
					this = root.father.mother
				}
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_sisterwife
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = yes
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_sister_concubine
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = yes
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_daughterwife
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = { any_parent = { this = root } }
				}
				is_female = yes
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_daughter_concubine
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = { any_parent = { this = root } }
				}
				any_consort = { this = root }
				is_female = yes
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_fatherhusband
		trigger = {
			scope:second = {
				OR = {
					this = root.father
					this = root.father.father
					this = root.mother.father
				}
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_father_consort
		trigger = {
			scope:second = {
				OR = {
					this = root.father
					this = root.father.father
					this = root.mother.father
				}
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_brotherhusband
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = no
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_brother_consort
		trigger = {
			scope:second = {
				any_sibling = { this = root }
				is_female = no
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_sonhusband
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
				is_female = no
				any_spouse = { this = root }
			}
		}
	}

	text = {
		localization_key = relation_son_consort
		trigger = {
			scope:second = {
				OR = {
					any_parent = { this = root }
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
				is_female = no
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_wife
		trigger = {
			scope:second = {
				is_female = yes
				OR = {
					any_spouse = {
						even_if_dead = yes
						this = root
					}
					any_former_spouse = {
						even_if_dead = yes
						this = root
					}
				}
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_husband
		trigger = {
			scope:second = {
				is_male = yes
				OR = {
					any_spouse = {
						even_if_dead = yes
						this = root
					}
					any_former_spouse = {
						even_if_dead = yes
						this = root
					}
				}
				is_concubine = no
			}
		}
	}

	text = {
		localization_key = relation_mother
		trigger = {
			scope:second = {
				is_female = yes
				any_child = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_father
		trigger = {
			scope:second = {
				is_female = no
				any_child = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_daughter
		trigger = {
			scope:second = {
				is_female = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_son
		trigger = {
			scope:second = {
				is_male = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_grandmother
		trigger = {
			scope:second = {
				is_female = yes
				is_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_grandfather
		trigger = {
			scope:second = {
				is_male = yes
				is_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_granddaughter
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					even_if_dead = yes
					any_parent = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_grandson
		trigger = {
			scope:second = {
				is_female = no
				any_parent = {
					even_if_dead = yes
					any_parent = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_sister
		trigger = {
			scope:second = {
				is_female = yes
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother
		trigger = {
			scope:second = {
				is_female = no
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_niece
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nephew
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_aunt
		trigger = {
			scope:second = {
				is_female = yes
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_uncle
		trigger = {
			scope:second = {
				is_female = no
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_hostage
		trigger = {
			scope:second = {
				is_hostage = yes
				warden ?= root
			}
		}
	}

	text = {
		localization_key = relation_warden
		trigger = {
			is_hostage = yes
			warden ?= scope:second
		}
	}

	text = {
		localization_key = relation_concubine_female
		trigger = {
			scope:second = {
				is_female = yes
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_concubine_male
		trigger = {
			scope:second = {
				is_male = yes
				any_consort = { this = root }
				is_concubine = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandmother
		trigger = {
			scope:second = {
				is_female = yes
				is_great_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_great_grandfather
		trigger = {
			scope:second = {
				is_male = yes
				is_great_grandparent_of = root
			}
		}
	}

	text = {
		localization_key = relation_religious_head
		trigger = {
			faith.religious_head = scope:second
		}
	}
	
	text = {
		localization_key = relation_disciple
		trigger = {
			scope:second = {
				any_relation = {
					type = elder
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_elder
		trigger = {
			scope:second = {
				any_relation = {
					type = disciple
					this = root
				}
			}
		}
	}
	
	text = {
		localization_key = relation_movement_leader
		trigger = {
			scope:second = {
				trigger_if = {
					limit = {
						any_character_situation = {
							situation_type = dynastic_cycle
						}
						government_has_flag = government_is_celestial
						root = { government_has_flag = government_is_celestial }
					}
				}
				is_any_movement_leader = yes
				top_participant_group:dynastic_cycle ?= root.top_participant_group:dynastic_cycle
			}
		}
	}

	text = {
		localization_key = relation_greatgranddaughter
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					even_if_dead = yes
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_greatgrandson
		trigger = {
			scope:second = {
				is_female = no
				any_parent = {
					even_if_dead = yes
					any_parent = {
						even_if_dead = yes
						any_parent = {
							this = root
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_cousin
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_cousin_female
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_female = yes
			}
		}
	}

	text = {
		localization_key = daughter_in_law
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					is_child_of = root
				}
			}
		}
	}

	text = {
		localization_key = son_in_law
		trigger = {
			scope:second = {
				is_female = no
				any_spouse = {
					is_child_of = root
				}
			}
		}
	}

	text = {
		localization_key = relation_soulmate_female
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = soulmate
						this = root
					}
					any_memory = {
						memory_type = soulmate_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_lover_female
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = lover
						this = root
					}
					any_memory = {
						memory_type = lover_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = yes
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_soulmate_male
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = soulmate
						this = root
					}
					any_memory = {
						memory_type = soulmate_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_lover_male
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = lover
						this = root
					}
					any_memory = {
						memory_type = lover_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = no
				trigger_if = { # not reflected in has_RelationToMe_relation trigger
					limit = { has_secret_relation_lover = root }
					any_secret = {
						type = secret_lover
						secret_target = { this = root }
						local_player_knows_this_secret = yes
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_best_friend_female
		trigger = {
			scope:second = {
				OR = {
					has_relation_best_friend = root
					any_memory = {
						memory_type = best_friend_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_friend_female
		trigger = {
			scope:second = {
				OR = {
					has_relation_friend = root
					any_memory = {
						memory_type = friend_died
						memory_participant:dead_relation ?= root
					}
				}
				NOT = { has_relation_best_friend = root }
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_best_friend_male
		trigger = {
			scope:second = {
				OR = {
					has_relation_best_friend = root
					any_memory = {
						memory_type = best_friend_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_friend_male
		trigger = {
			scope:second = {
				OR = {
					has_relation_friend = root
					any_memory = {
						memory_type = best_friend_died
						memory_participant:dead_relation ?= root
					}
				}
				NOT = { has_relation_best_friend = root }
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_nemesis_female
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = nemesis
						this = root
					}
					any_memory = {
						memory_type = nemesis_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_rival_female
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = rival
						this = root
					}
					any_memory = {
						memory_type = rival_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_nemesis_male
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = nemesis
						this = root
					}
					any_memory = {
						memory_type = nemesis_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_rival_male
		trigger = {
			scope:second = {
				OR = {
					any_relation = {
						type = rival
						this = root
					}
					any_memory = {
						memory_type = rival_died
						memory_participant:dead_relation ?= root
					}
				}
				is_female = no
			}
		}
	}

	text = {
		localization_key = relation_crush
		trigger = {
			any_relation = {
				type = crush
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_bully
		trigger = {
			scope:second = {
				any_relation = {
					type = victim
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_victim
		trigger = {
			scope:second = {
				any_relation = {
					type = bully
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_ward
		trigger = {
			scope:second = {
				any_relation = {
					type = guardian
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_guardian
		trigger = {
			scope:second = {
				any_relation = {
					type = ward
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_foe
		trigger = {
			scope:second = {
				is_at_war_with = root
			}
		}
	}

	text = { #intrigue-mentor
		localization_key = relation_mentor
		trigger = {
			scope:second = {
				any_relation = {
					type = intrigue_student
					this = root
				}
			}
		}
	}

	text = { #intrigue-mentor
		localization_key = relation_student
		trigger = {
			scope:second = {
				any_relation = {
					type = intrigue_mentor
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_mentor
		trigger = {
			scope:second = {
				any_relation = {
					type = student
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_student
		trigger = {
			scope:second = {
				any_relation = {
					type = mentor
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_sisterinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_brotherinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_cousininlaw_female
		trigger = {
			scope:second = {
				is_female = yes
				is_cousin_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_cousininlaw_male
		trigger = {
			scope:second = {
				is_female = no
				is_cousin_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_auntinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_auntuncle_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_uncleinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_auntuncle_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandmotherinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandfatherinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandmotherinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_great_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandfatherinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_great_grandmotherfather_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_granddaughterinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_grandsoninlaw
		trigger = {
			scope:second = {
				is_female = no
				is_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_granddaughterinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_great_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_great_grandsoninlaw
		trigger = {
			scope:second = {
				is_female = no
				is_great_granddaughterson_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nieceinlaw
		trigger = {
			scope:second = {
				is_female = yes
				is_nibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nephewinlaw
		trigger = {
			scope:second = {
				is_female = no
				is_nibling_in_law_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_ceremonial_liege_female
		trigger = {
			scope:second = {
				is_female = yes
				top_liege = root.top_liege
				tgp_is_ceremonial_liege_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_ceremonial_liege_male
		trigger = {
			scope:second = {
				is_female = no
				top_liege = root.top_liege
				tgp_is_ceremonial_liege_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_stepdaughter
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					any_spouse = {
						this = root
						NOT = { is_parent_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepson
		trigger = {
			scope:second = {
				is_male = yes
				any_parent = {
					any_spouse = {
						this = root
						NOT = { is_parent_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepsister
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					any_spouse = {
						any_child = {
							this = root
							NOT = { is_sibling_of = scope:second }
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepbrother
		trigger = {
			scope:second = {
				is_male = yes
				any_parent = {
					any_spouse = {
						any_child = {
							this = root
							NOT = { is_sibling_of = scope:second }
						}
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepmother
		trigger = {
			scope:second = {
				is_female = yes
				any_spouse = {
					any_child = {
						this = root
						NOT = { is_child_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_stepfather
		trigger = {
			scope:second = {
				is_male = yes
				any_spouse = {
					any_child = {
						this = root
						NOT = { is_child_of = scope:second }
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_female
		trigger = {
			scope:second = {
				is_female = yes
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_liege_male
		trigger = {
			scope:second = {
				is_female = no
				any_vassal_or_below = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = duke_viceroyalty_female_byzantine_group
		trigger = {
			culture = culture:greek
			scope:second = {
				is_female = yes
				government_allows = administrative
			}
			any_vassal_or_below = {
				this = scope:second
				government_allows = administrative
			}
		}
	}


	text = {
		localization_key = duke_viceroyalty_male_byzantine_group
		trigger = {
			culture = culture:greek
			scope:second = {
				is_female = no
				government_allows = administrative
			}
			any_vassal_or_below = {
				this = scope:second
				government_allows = administrative
			}
		}
	}

	text = {
		localization_key = relation_vassal_female
		trigger = {
			scope:second = {
				is_female = yes			
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_vassal_male
		trigger = {
			scope:second = {
				is_female = no				
			}
			any_vassal_or_below = {
				this = scope:second
			}
		}
	}

	text = {
		localization_key = relation_fellow_vassal_female
		trigger = {
			scope:second = {
				is_female = yes		
				top_liege != this	
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_fellow_vassal_male
		trigger = {
			scope:second = {
				is_female = no	
				top_liege != this		
			}
			top_liege != this
			liege = scope:second.liege
		}
	}

	text = {
		localization_key = relation_councillor_female
		trigger = {
			scope:second = {
				is_female = yes			
				is_councillor_of = root
			}
		}
	}

	text = {
		localization_key = relation_councillor_male
		trigger = {
			scope:second = {
				is_female = no				
				is_councillor_of = root
			}
		}
	}

	text = {
		localization_key = relation_court_physician_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_physician_court_position
				is_court_position_employer = {
					court_position = court_physician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_physician_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_physician_court_position
				is_court_position_employer = {
					court_position = court_physician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_keeper_of_swans_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = keeper_of_swans_court_position
				is_court_position_employer = {
					court_position = keeper_of_swans_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_keeper_of_swans_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = keeper_of_swans_court_position
				is_court_position_employer = {
					court_position = keeper_of_swans_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = travel_leader_court_position
				is_court_position_employer = {
					court_position = travel_leader_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_travel_leader_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = travel_leader_court_position
				is_court_position_employer = {
					court_position = travel_leader_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_horse_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = master_of_horse_court_position
				is_court_position_employer = {
					court_position = master_of_horse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_horse_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = master_of_horse_court_position
				is_court_position_employer = {
					court_position = master_of_horse_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_jester_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_jester_court_position
				is_court_position_employer = {
					court_position = court_jester_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_jester_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_jester_court_position
				is_court_position_employer = {
					court_position = court_jester_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_hunt_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = master_of_hunt_court_position
				is_court_position_employer = {
					court_position = master_of_hunt_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_master_of_hunt_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = master_of_hunt_court_position
				is_court_position_employer = {
					court_position = master_of_hunt_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_high_almoner_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = high_almoner_court_position
				is_court_position_employer = {
					court_position = high_almoner_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_high_almoner_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = high_almoner_court_position
				is_court_position_employer = {
					court_position = high_almoner_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cupbearer_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = cupbearer_court_position
				is_court_position_employer = {
					court_position = cupbearer_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_cupbearer_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = cupbearer_court_position
				is_court_position_employer = {
					court_position = cupbearer_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_seneschal_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = seneschal_court_position
				is_court_position_employer = {
					court_position = seneschal_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_seneschal_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = seneschal_court_position
				is_court_position_employer = {
					court_position = seneschal_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_antiquarian_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = antiquarian_court_position
				is_court_position_employer = {
					court_position = antiquarian_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_antiquarian_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = antiquarian_court_position
				is_court_position_employer = {
					court_position = antiquarian_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_tutor_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_tutor_court_position
				is_court_position_employer = {
					court_position = court_tutor_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_tutor_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_tutor_court_position
				is_court_position_employer = {
					court_position = court_tutor_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_royal_architect_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = royal_architect_court_position
				is_court_position_employer = {
					court_position = royal_architect_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_royal_architect_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = royal_architect_court_position
				is_court_position_employer = {
					court_position = royal_architect_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_poet_female
		trigger = {
			scope:second = {	
				is_female = yes
				has_court_position = court_poet_court_position
				is_court_position_employer = {
					court_position = court_poet_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_poet_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_poet_court_position
				is_court_position_employer = {
					court_position = court_poet_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_bodyguard_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = bodyguard_court_position
				is_court_position_employer = {
					court_position = bodyguard_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_bodyguard_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = bodyguard_court_position
				is_court_position_employer = {
					court_position = bodyguard_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_champion_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = champion_court_position
				is_court_position_employer = {
					court_position = champion_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_champion_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = champion_court_position
				is_court_position_employer = {
					court_position = champion_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_musician_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = court_musician_court_position
				is_court_position_employer = {
					court_position = court_musician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_court_musician_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = court_musician_court_position
				is_court_position_employer = {
					court_position = court_musician_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_food_taster_female
		trigger = {
			scope:second = {
				is_female = yes
				has_court_position = food_taster_court_position
				is_court_position_employer = {
					court_position = food_taster_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_food_taster_male
		trigger = {
			scope:second = {
				is_male = yes
				has_court_position = food_taster_court_position
				is_court_position_employer = {
					court_position = food_taster_court_position
					who = root
				}
			}
		}
	}

	text = {
		localization_key = relation_akolouthos_male
		trigger = {
			scope:second = { is_male = yes }
			has_court_position = akolouthos_court_position
			is_court_position_employer = {
		        court_position = akolouthos_court_position
		        who = root
		    }
		}
	}

	text = {
		localization_key = relation_akolouthos_female
		trigger = {
			scope:second = { is_female = yes }
			has_court_position = akolouthos_court_position
			is_court_position_employer = {
		        court_position = akolouthos_court_position
		        who = root
		    }
		}
	}
	
	text = {
		localization_key = relation_court_astrologer_male
		trigger = {
			scope:second = { is_male = yes }
			has_court_position = court_astrologer_court_position
			is_court_position_employer = {
		        court_position = court_astrologer_court_position
		        who = root
		    }
		}
	}
	
	text = {
		localization_key = relation_court_astrologer_female
		trigger = {
			scope:second = { is_female = yes }
			has_court_position = court_astrologer_court_position
			is_court_position_employer = {
		        court_position = court_astrologer_court_position
		        who = root
		    }
		}
	}

	text = {
		localization_key = relation_knight
		trigger = {
			scope:second = { is_knight_of = root }
		}
	}

	text = {
		localization_key = relation_ally
		trigger = {
			scope:second = {
				is_allied_to = root
			}
		}
	}

	text = {
		localization_key = relation_kinswoman
		trigger = {
			scope:second = {
				is_female = yes
				is_lowborn = no
			}
			scope:second.dynasty = root.dynasty
		}
	}

	text = {
		localization_key = relation_kinsman
		trigger = {
			scope:second = {
				is_male = yes
				is_lowborn = no
			}
			scope:second.dynasty = root.dynasty
		}
	}

	text = {
		localization_key = relation_follower_female
		trigger = {
			is_landed_or_landless_administrative = no
			scope:second = {
				is_courtier_of = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_follower_male
		trigger = {
			is_landed_or_landless_administrative = no
			scope:second = {
				is_courtier_of = root
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_courtier_female
		trigger = {
			scope:second = {
				is_courtier_of = root
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_courtier_male
		trigger = {
			scope:second = {
				is_courtier_of = root
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_peasant_affair_female
		trigger = {
			any_owned_story = {
				type = story_peasant_affair
				var:peasant_character = {
					this = scope:second
					is_female = yes
				}
			}
		}
	}

	text = {
		localization_key = relation_peasant_affair_male
		trigger = {
			any_owned_story = {
				type = story_peasant_affair
				var:peasant_character = {
					this = scope:second
					is_male = yes
				}
			}
		}
	}

	text = {
		localization_key = relation_agent
		trigger = {
			any_scheme = {
				scheme_is_character_agent = scope:second
			}
		}
	}

	text = {
		localization_key = relation_host_female
		trigger = {
			host ?= scope:second
			scope:second = { is_female = yes }
			NOT = {
				liege ?= scope:second
			}
		}
	}

	text = {
		localization_key = relation_host_male
		trigger = {
			host ?= scope:second
			scope:second = { is_male = yes }
			NOT = {
				liege ?= scope:second
			}
		}
	}

	text = {
		localization_key = relation_leader_female
		trigger = {
			host ?= scope:second
			scope:second = { is_female = yes }
			liege ?= scope:second
			scope:second = { has_government = landless_adventurer_government }
		}
	}

	text = {
		localization_key = relation_leader_male
		trigger = {
			host ?= scope:second
			scope:second = { is_male = yes }
			liege ?= scope:second
			scope:second = { has_government = landless_adventurer_government }
		}
	}

	text = {
		localization_key = relation_liege_female
		trigger = {
			host ?= scope:second
			scope:second = { is_female = yes }
			liege ?= scope:second
		}
	}

	text = {
		localization_key = relation_liege_male
		trigger = {
			host ?= scope:second
			scope:second = { is_male = yes }
			liege ?= scope:second
		}
	}

	text = {
		localization_key = relation_prisoner_female
		trigger = {
			scope:second = {
				is_female = yes
				is_imprisoned_by = root
			}
		}
	}
	
	text = {
		localization_key = relation_movement_leader
		trigger = {
			scope:second = {
				trigger_if = {
					limit = {
						any_character_situation = {
							situation_type = dynastic_cycle
						}
						government_has_flag = government_is_celestial
						root = { government_has_flag = government_is_celestial }
					}
				}
				is_any_movement_leader = yes
				top_participant_group:dynastic_cycle ?= root.top_participant_group:dynastic_cycle
			}
		}
	}

	text = {
		localization_key = relation_prisoner_male
		trigger = {
			scope:second = {
				is_male = yes
				is_imprisoned_by = root
			}
		}
	}

	text = {
		localization_key = relation_jailer_female
		trigger = {
			is_imprisoned_by = scope:second
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_jailer_male
		trigger = {
			is_imprisoned_by = scope:second
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_guest_female
		trigger = {
			scope:second = {
				is_female = yes
				host ?= root
			}
		}
	}

	text = {
		localization_key = relation_guest_male
		trigger = {
			scope:second = {
				is_male = yes
				host ?= root
			}
		}
	}
	
	text = {
		localization_key = relation_old_foe_female
		trigger = {
			root = {
				any_memory = {
					OR = {
						has_memory_type = war_won
						has_memory_type = war_lost
					}
					any_memory_participant = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_old_foe_male
		trigger = {
			root = {
				any_memory = {
					OR = {
						has_memory_type = war_won
						has_memory_type = war_lost
					}
					any_memory_participant = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_pilgrim_female
		trigger = {
			root = {
				current_travel_plan ?= {
					travel_leader.involved_activity ?= {
						has_activity_type = activity_pilgrimage
					}
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_pilgrim_male
		trigger = {
			root = {
				current_travel_plan ?= {
					travel_leader.involved_activity ?= {
						has_activity_type = activity_pilgrimage
					}
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_traveler_female
		trigger = {
			root = {
				current_travel_plan ?= {
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_traveler_male
		trigger = {
			root = {
				current_travel_plan ?= {
					any_entourage_character = {
						this = scope:second
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_contestant_female
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_guest_subset_current_phase = { #you're participating
						name = contestant
						this = root					
					}
					any_guest_subset_current_phase = { #they are participating
						name = contestant
						this = scope:second					
					}
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_contestant_male
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_guest_subset_current_phase = { #you're participating
						name = contestant
						this = root					
					}
					any_guest_subset_current_phase = { #they are participating
						name = contestant
						this = scope:second					
					}
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}
	
	text = {
		localization_key = relation_fellow_attendee_female
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_attending_character = { this = scope:second }
				}
			}
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_fellow_attendee_male
		trigger = {
			root = {
				involved_activity ?= {
					has_activity_type = activity_tournament
					any_attending_character = { this = scope:second }
				}
			}
			scope:second = {
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_servant_of_china_female
		trigger = {
			scope:second = {
				top_liege != this
				top_liege = {
					has_government = celestial_government
					NOT = { this = root }
				}
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_servant_of_china_male
		trigger = {
			scope:second = {
				top_liege != this
				top_liege = {
					has_government = celestial_government
					NOT = { this = root }
				}
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_acquaintance_female
		trigger = {
			scope:second = {
				is_female = yes
			}
		}
	}

	text = {
		localization_key = relation_acquaintance_male
		trigger = {
			scope:second = {
				is_male = yes
			}
		}
	}
}

CloseOrExtendedFamilyRelationToMe = {
	type = character

	text = {
		localization_key = relation_mother
		trigger = {
			scope:second = {
				is_female = yes
				any_child = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_father
		trigger = {
			scope:second = {
				is_female = no
				any_child = {
					this = root
				}
			}
		}
	}

	text = { #Both grandparents and great grandparents
		localization_key = relation_grandmother
		trigger = {
			scope:second = {
				is_female = yes
				OR = {
					any_child = {
						even_if_dead = yes
						any_child = {
							this = root
						}
					}
					any_child = {
						even_if_dead = yes
						any_child = {
							even_if_dead = yes
							any_child = {
								this = root
							}
						}
					}
				}
			}
		}
	}

	text = { #Both grandparents and great grandparents
		localization_key = relation_grandfather
		trigger = {
			scope:second = {
				is_female = no
				OR = {
					any_child = {
						even_if_dead = yes
						any_child = {
							this = root
						}
					}
					any_child = {
						even_if_dead = yes
						any_child = {
							even_if_dead = yes
							any_child = {
								this = root
							}
						}
					}
				}
			}
		}
	}


	text = {
		localization_key = relation_daughter
		trigger = {
			scope:second = {
				is_female = yes
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_son
		trigger = {
			scope:second = {
				is_female = no
				is_child_of = root
			}
		}
	}

	text = {
		localization_key = relation_granddaughter
		trigger = {
			scope:second = {
				is_female = yes
				any_parent = {
					even_if_dead = yes
					any_parent = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_grandson
		trigger = {
			scope:second = {
				is_female = no
				any_parent = {
					even_if_dead = yes
					any_parent = {
						this = root
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_sister
		trigger = {
			scope:second = {
				is_female = yes
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_brother
		trigger = {
			scope:second = {
				is_female = no
				any_sibling = {
					this = root
				}
			}
		}
	}

	text = {
		localization_key = relation_niece
		trigger = {
			scope:second = {
				is_female = yes
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_nephew
		trigger = {
			scope:second = {
				is_female = no
				is_sibling_child_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_aunt
		trigger = {
			scope:second = {
				is_female = yes
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_uncle
		trigger = {
			scope:second = {
				is_female = no
				is_parent_sibling_of_root_trigger = yes
			}
		}
	}

	text = {
		localization_key = relation_hostage
		trigger = {
			scope:second = {
				is_hostage = yes
				warden ?= root
			}
		}
	}

	text = {
		localization_key = relation_warden
		trigger = {
			is_hostage = yes
			warden ?= scope:second
		}
	}

	text = {
		localization_key = relation_cousin
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_male = yes
			}
		}
	}

	text = {
		localization_key = relation_cousin_female
		trigger = {
			scope:second = {
				is_cousin_of_root_trigger = yes
				is_female = yes
			}
		}
	}
}


###CharacterIntroduction custom loc and how they work###

#Available keys:
#MyCharacterIntroduction
#YourCharacterIntroduction
#HerHisCharacterIntroduction
#NamePossessiveCharacterIntroduction
#MyCharacterIntroductionNoComma
#YourCharacterIntroductionNoComma
#HerHisCharacterIntroductionNoComma
#NamePossessiveCharacterIntroductionNoComm

#Support key:
#CharacterIntroductionSupportNoComma

#All the NoComma keys use CharacterIntroductionSupportNoComma + their own versions of "my/your/her/his/namepossessive [relation] [TitledFirstName]" AND for "my/your/her/his/namepossessive [TitledFirstName]"
#All the keys with comma at the end uses their own NoComma version + comma (for example MyCharacterIntroduction uses a string with MyCharacterIntroductionNoComma + comma) except for related characters and titled characters which should never have an automagic comma at the end (for example, "King Bob of England" or "my sister Ruth")


#NOTE: Introduction keys used in text operate with a scope structure of [IntroducedCharacter.Custom2('CharacterIntroductionKey', PerspectiveCharacter)].
#This means that they have the reverse logic of the RelationToMe keys


#Support key
CharacterIntroductionSupportNoComma = {
	type = character

	#My/Your/HerHis/NamePossessive relation comest first, handled by the My/Your/HerHis/NamePossessive NoComma loc

	text = {
		trigger = {
			exists = primary_title
		}
		localization_key = CharacterIntroductionSupportNoComma_titledfirstnameoftitle
	}

	#Spouse/Child/knight of landed character comest after has primary title check, handled by the My/Your/HerHis/NamePossessive NoComma loc


	#has a liege
	text = {
		trigger = {
			liege ?= { exists = primary_title }
			is_lowborn = no
			is_female = yes
		}
		localization_key = CharacterIntroductionSupportNoComma_firstnamedynastyname_a_noblewoman_from_liege_title
	}

	text = {
		trigger = {
			liege ?= { exists = primary_title }
			is_lowborn = no
			is_male = yes
		}
		localization_key = CharacterIntroductionSupportNoComma_firstnamedynastyname_a_nobleman_from_liege_title
	}

	text = {
		trigger = {
			liege ?= { exists = primary_title }
			is_lowborn = yes
		}
		localization_key = CharacterIntroductionSupportNoComma_firstname_a_commoner_from_liege_title
	}

	#had a location
	text = {
		trigger = {
			is_lowborn = no
			is_female = yes
			exists = location.barony
		}
		localization_key = CharacterIntroductionSupportNoComma_firstnamedynastyname_a_noblewoman_from_current_location
	}

	text = {
		trigger = {
			is_lowborn = no
			is_male = yes
			exists = location.barony
		}
		localization_key = CharacterIntroductionSupportNoComma_firstnamedynastyname_a_nobleman_from_current_location
	}

	text = {
		trigger = {
			is_lowborn = yes
			exists = location.barony
		}
		localization_key = CharacterIntroductionSupportNoComma_firstname_a_commoner_from_current_location
	}

	#fallback
	text = {
		trigger = {
			is_lowborn = no
			is_female = yes
		}
		localization_key = CharacterIntroductionSupportNoComma_firstnamedynastyname_a_noblewoman
	}

	text = {
		trigger = {
			is_lowborn = no
			is_male = yes
		}
		localization_key = CharacterIntroductionSupportNoComma_firstnamedynastyname_a_nobleman
	}

	text = {
		trigger = {
			is_lowborn = yes
		}
		localization_key = CharacterIntroductionSupportNoComma_firstname_a_commoner
	}
}

#NoCommaKey
MyCharacterIntroductionNoComma = {
	type = character

	text = { #Exception for landed court chaplains who shouldn't have their title appear twice
		trigger = {
			is_councillor_of = scope:second
			has_council_position = councillor_court_chaplain
			is_playable_character = yes
			NOR = {
				is_spouse_of = scope:second
				is_close_or_extended_family_of = scope:second
			}
		}
		localization_key = MyCharacterIntroductionNoComma_my_counciltitle_firstname
	}

	text = {
		trigger = { has_RelationToMe_relation = { CHARACTER = scope:second } }
		localization_key = MyCharacterIntroductionNoComma_my_relation_titledfirstname
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			primary_spouse ?= { exists = primary_title }
		}
		localization_key = MyCharacterIntroductionNoComma_the_relation_of_MyCharacterIntroductionNoComma_primaryspouse
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = father
			dynasty = father.dynasty
			father = { exists = primary_title }
		}
		localization_key = MyCharacterIntroductionNoComma_the_relation_of_MyCharacterIntroductionNoComma_father
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			mother ?= { exists = primary_title }
		}
		localization_key = MyCharacterIntroductionNoComma_the_relation_of_MyCharacterIntroductionNoComma_mother
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_councillor_of = liege
		}
		localization_key = MyCharacterIntroductionNoComma_the_relation_of_MyCharacterIntroductionNoComma_councillor
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_knight_of = liege
		}
		localization_key = MyCharacterIntroductionNoComma_the_relation_of_MyCharacterIntroductionNoComma_knight
	}


	#Uses "CharacterIntroductionNoComma"
	text = {
		localization_key = CharacterIntroductionSupportNoComma_fallback
	}
}

YourCharacterIntroductionNoComma = {
	type = character

	text = { #Exception for landed court chaplains who shouldn't have their title appear twice
		trigger = {
			is_councillor_of = scope:second
			has_council_position = councillor_court_chaplain
			is_playable_character = yes
			NOR = {
				is_spouse_of = scope:second
				is_close_or_extended_family_of = scope:second
			}
		}
		localization_key = YourCharacterIntroductionNoComma_your_counciltitle_firstname
	}

	text = {
		trigger = { has_RelationToMe_relation = { CHARACTER = scope:second } }
		localization_key = YourCharacterIntroductionNoComma_your_relation_titledfirstname
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			primary_spouse ?= { exists = primary_title }
		}
		localization_key = YourCharacterIntroductionNoComma_the_relation_of_YourCharacterIntroductionNoComma_primaryspouse
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = father
			dynasty = father.dynasty
			father = { exists = primary_title }
		}
		localization_key = YourCharacterIntroductionNoComma_the_relation_of_YourCharacterIntroductionNoComma_father
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			mother ?= { exists = primary_title }
		}
		localization_key = YourCharacterIntroductionNoComma_the_relation_of_YourCharacterIntroductionNoComma_mother
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_councillor_of = liege
		}
		localization_key = YourCharacterIntroductionNoComma_the_relation_of_YourCharacterIntroductionNoComma_councillor
	}
	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_knight_of = liege
		}
		localization_key = YourCharacterIntroductionNoComma_the_relation_of_YourCharacterIntroductionNoComma_knight
	}

	#Uses "CharacterIntroductionNoComma"
	text = {
		localization_key = CharacterIntroductionSupportNoComma_fallback
	}
}


HerHisCharacterIntroductionNoComma = {
	type = character

	text = { #Exception for landed court chaplains who shouldn't have their title appear twice
		trigger = {
			is_councillor_of = scope:second
			has_council_position = councillor_court_chaplain
			is_playable_character = yes
			NOR = {
				is_spouse_of = scope:second
				is_close_or_extended_family_of = scope:second
			}
		}
		localization_key = HerHisCharacterIntroductionNoComma_herhis_counciltitle_firstname
	}


	text = {
		trigger = { has_RelationToMe_relation = { CHARACTER = scope:second } }
		localization_key = HerHisCharacterIntroductionNoComma_herhis_relation_titledfirstname
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			primary_spouse ?= { exists = primary_title }
		}
		localization_key = HerHisCharacterIntroductionNoComma_the_relation_of_HerHisCharacterIntroductionNoComma_primaryspouse
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = father
			dynasty = father.dynasty
			father = { exists = primary_title }
		}
		localization_key = HerHisCharacterIntroductionNoComma_the_relation_of_HerHisCharacterIntroductionNoComma_father
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			mother ?= { exists = primary_title }
		}
		localization_key = HerHisCharacterIntroductionNoComma_the_relation_of_HerHisCharacterIntroductionNoComma_mother
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_councillor_of = liege
		}
		localization_key = HerHisCharacterIntroductionNoComma_the_relation_of_HerHisCharacterIntroductionNoComma_councillor
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_knight_of = liege
		}
		localization_key = HerHisCharacterIntroductionNoComma_the_relation_of_HerHisCharacterIntroductionNoComma_knight
	}

	#Uses "CharacterIntroductionNoComma"
	text = {
		localization_key = CharacterIntroductionSupportNoComma_fallback
	}
}


NamePossessiveCharacterIntroductionNoComma = {
	type = character

	text = { #Exception for landed court chaplains who shouldn't have their title appear twice
		trigger = {
			is_councillor_of = scope:second
			has_council_position = councillor_court_chaplain
			is_playable_character = yes
			NOR = {
				is_spouse_of = scope:second
				is_close_or_extended_family_of = scope:second
			}
		}
		localization_key = NamePossessiveCharacterIntroductionNoComma_namepossessive_counciltitle_firstname
	}

	text = {
		trigger = { has_RelationToMe_relation = { CHARACTER = scope:second } }
		localization_key = NamePossessiveCharacterIntroductionNoComma_namepossessive_relation_titledfirstname
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			primary_spouse ?= { exists = primary_title }
		}
		localization_key = NamePossessiveCharacterIntroductionNoComma_the_relation_of_NamePossessiveCharacterIntroduction_primaryspouse
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = father
			dynasty = father.dynasty
			father = { exists = primary_title }
		}
		localization_key = NamePossessiveCharacterIntroductionNoComma_the_relation_of_NamePossessiveCharacterIntroduction_father
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			mother ?= { exists = primary_title }
		}
		localization_key = NamePossessiveCharacterIntroductionNoComma_the_relation_of_NamePossessiveCharacterIntroduction_mother
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_councillor_of = liege
		}
		localization_key = NamePossessiveCharacterIntroductionNoComma_the_relation_of_NamePossessiveCharacterIntroductionNoComma_councillor
	}

	text = {
		trigger = {
			NOT = { exists = primary_title }
			exists = liege
			is_knight_of = liege
		}
		localization_key = NamePossessiveCharacterIntroductionNoComma_the_relation_of_NamePossessiveCharacterIntroductionNoComma_knight
	}

	#Uses "CharacterIntroductionNoComma"
	text = {
		localization_key = CharacterIntroductionSupportNoComma_fallback
	}
}

MyCharacterIntroduction = {
	type = character

	text = {
		trigger = {
			OR = {
				has_RelationToMe_relation = { CHARACTER = scope:second }
				exists = primary_title
			}
		}
		localization_key = MyCharacterIntroductionNoComma #Should have no comma
	}

	#MyCharacterIntroductionNoComma + comma
	text = {
		localization_key = MyCharacterIntroductionNoCommaPlusComma
	}
}

MyCharacterIntroductionPossessive = {
	type = character

	text = {
		trigger = {
			OR = {
				has_RelationToMe_relation = { CHARACTER = scope:second }
				exists = primary_title
			}
		}
		localization_key = MyCharacterIntroductionNoComma #Should have no comma
	}

	#MyCharacterIntroductionNoComma + comma
	text = {
		localization_key = MyCharacterIntroductionNoCommaPlusComma
	}
}

YourCharacterIntroduction = {
	type = character

	text = {
		trigger = {
			OR = {
				has_RelationToMe_relation = { CHARACTER = scope:second }
				exists = primary_title
			}
		}
		localization_key = YourCharacterIntroductionNoComma #Should have no comma
	}

	#MyCharacterIntroductionNoComma + comma
	text = {
		localization_key = YourCharacterIntroductionNoCommaPlusComma
	}
}

HerHisCharacterIntroduction = {
	type = character

	text = {
		trigger = {
			OR = {
				has_RelationToMe_relation = { CHARACTER = scope:second }
				exists = primary_title
			}
		}
		localization_key = HerHisCharacterIntroductionNoComma #Should have no comma
	}

	#MyCharacterIntroductionNoComma + comma
	text = {
		localization_key = HerHisCharacterIntroductionNoCommaPlusComma
	}
}

NamePossessiveCharacterIntroduction = {
	type = character

	text = {
		trigger = {
			OR = {
				has_RelationToMe_relation = { CHARACTER = scope:second }
				exists = primary_title
			}
		}
		localization_key = NamePossessiveCharacterIntroductionNoComma #Should have no comma
	}

	#MyCharacterIntroductionNoComma + comma
	text = {
		localization_key = NamePossessiveCharacterIntroductionNoCommaPlusComma
	}
}







RelationToMeAddress = {
	type = character
	#first_valid

	text = {
		localization_key = relation_my_mother
		trigger = {
			is_female = yes
			is_parent_of = scope:second
		}
	}

	text = {
		localization_key = relation_my_father
		trigger = {
			is_male = yes
			is_parent_of = scope:second
		}
	}

	text = {
		localization_key = relation_my_husband
		trigger = {
			is_male = yes
			is_spouse_of = scope:second
		}
	}

	text = {
		localization_key = relation_my_love
		trigger = {
			OR = {
				AND = {
					has_relation_lover = scope:second
					trigger_if = { # not reflected in has_RelationToMe_relation trigger
						limit = { has_secret_relation_lover = root }
						any_secret = {
							type = secret_lover
							secret_target = { this = root }
							local_player_knows_this_secret = yes
						}
					}
				}
				AND = {
					is_spouse_of = scope:second
					reverse_opinion = {
						target = scope:second
						value > 40
					}
				}
			}
		}
	}

	text = {
		localization_key = relation_my_wife
		trigger = {
			is_female = yes
			is_spouse_of = scope:second
		}
	}

	text = {
		localization_key = relation_my_son

		trigger = {
			is_male = yes
			is_child_of = scope:second
		}
	}

	text = {
		localization_key = relation_my_daughter

		trigger = {
			is_female = yes
			is_child_of = scope:second
		}
	}	

	text = {
		localization_key = relation_my_brother

		trigger = {
			is_male = yes
			is_sibling_of = scope:second
		}
	}

	text = {
		localization_key = relation_my_sister

		trigger = {
			is_female = yes
			is_sibling_of = scope:second
		}
	}	
	
	

	text = {
		localization_key = relation_my_friend
		trigger = {
			has_relation_friend = scope:second
		}
	}

	text = {
		localization_key = relation_my_liege
		trigger = {
			scope:second = {
				liege ?= root
			}
		}
	}

	text = {
		localization_key = relation_my_title_foreign

		trigger = {
			exists = top_liege
			exists = scope:second.top_liege
			top_liege != scope:second.top_liege
			highest_held_title_tier > scope:second.highest_held_title_tier
		}
	}

	text = {
		trigger = {
			exists = top_liege
			exists = scope:second.top_liege
			top_liege = scope:second.top_liege
		}
		localization_key = relation_titled_firstname
	}

	text = {
		localization_key = relation_my_lady

		trigger = {
			is_female = yes
		}
	}

	text = {
		localization_key = relation_my_lord

		trigger = {
			is_male = yes
		}
	}

		
}

MotherFather = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_mother
	}

	text = {
		localization_key = relation_father
	}
}

MotherFatherPossessive = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_mother_possessive
	}

	text = {
		localization_key = relation_father_possessive
	}
}

GetDaughterSon = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_daughter
	}

	text = {
		trigger = { is_female = no }
		localization_key = relation_son
	}	
}

GetDaughterSonPossessive = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_daughter_possessive
	}

	text = {
		trigger = { is_female = no }
		localization_key = relation_son_possessive
	}	
}

GetPrincessPrince = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = princess
	}

	text = {
		trigger = { is_female = no }
		localization_key = prince
	}	
}

GetLassLad = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = lass
	}

	text = {
		trigger = { is_female = no }
		localization_key = lad
	}	
}

GetTutorEducation = {
	type = character

	text = {
		trigger = { has_trait = education_martial }
		localization_key = game_concept_war
	}

	text = {
		trigger = { has_trait = education_stewardship }
		localization_key = stewardship
	}	

	text = {
		trigger = { has_trait = education_diplomacy }
		localization_key = diplomacy
	}	

	text = {
		trigger = { has_trait = education_intrigue }
		localization_key = intrigue
	}	

	text = {
		trigger = { has_trait = education_learning }
		localization_key = learning
	}	
}

SisterBrother = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_sister
	}

	text = {
		trigger = { is_female = no }
		localization_key = relation_brother
	}	
}

SisterBrotherPossessive = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_sister_possessive
	}

	text = {
		trigger = { is_female = no }
		localization_key = relation_brother_possessive
	}	
}

WifeHusbandOpp = {
	type = character
	
	text = {
		trigger = { is_female = yes }
		localization_key = relation_husband
	}

	text = {
		trigger = { is_female = no }
		localization_key = relation_wife
	}	
}

LadiesLords = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = lady_plural_lower_case
	}

	text = {
		trigger = { is_female = no }
		localization_key = lord_plural_lower_case
	}	
}

ChildChildrenGender = {
	type = character

	text = {
		trigger = {
			any_child = {
				any_sibling = { always = no }
				is_female = yes
			}
		}
		localization_key = relation_daughter
	}

	text = {
		trigger = {
			any_child = {
				any_sibling = { always = no }
				is_male = yes
			}
		}
		localization_key = relation_son
	}

	text = {
		trigger = {
			any_child = {
				is_female = yes
			}
			NOT = {
				any_child = {
					is_female = no
				}
			}
		}
		localization_key = relation_daughters
	}

	text = {
		trigger = {
			any_child = {
				is_male = yes
			}
			NOT = {
				any_child = {
					is_male = no
				}
			}
		}
		localization_key = relation_sons
	}

	text = {
		trigger = {
			any_child = {
				is_female = yes
			}
			any_child = {
				is_male = yes
			}
		}
		localization_key = relation_children
	}
}


#Use in the scope of a twin!
TwinDaughtersSonsChildren = {
	type = character

	text = {
		trigger = {
			is_female = yes
			any_sibling = {
				is_twin_of = prev
				is_female = yes
			}
		}
		localization_key = relation_daughters
	}
	text = {
		trigger = {
			is_male = yes
			any_sibling = {
				is_twin_of = prev
				is_male = yes
			}
		}
		localization_key = relation_sons
	}
	text = {
		trigger = {
			any_sibling = {
				is_twin_of = prev
				sex_opposite_of = prev
			}
		}
		localization_key = relation_children
	}
}

#Use in the scope of a twin!
TwinDaughtersSonsChildrenPossessive = {
	type = character

	text = {
		trigger = {
			is_female = yes
			any_sibling = {
				is_twin_of = prev
				is_female = yes
			}
		}
		localization_key = relation_daughters_possessive
	}
	text = {
		trigger = {
			is_male = yes
			any_sibling = {
				is_twin_of = prev
				is_male = yes
			}
		}
		localization_key = relation_sons_possessive
	}
	text = {
		trigger = {
			any_sibling = {
				is_twin_of = prev
				sex_opposite_of = prev
			}
		}
		localization_key = relation_children_possessive
	}
}

#Use either Council name title, or landed title.
GetCouncilOrTitleName = {
	type = character
	text = {
		trigger = {
			is_ruler = no
		}
		localization_key = title_council_name
	}
	text = {
		trigger = {
			is_ruler = yes
		}
		localization_key = title_landed_name
	}
}
GetCouncilOrTitleNamePossessive = {
	type = character
	text = {
		trigger = {
			is_ruler = no
		}
		localization_key = title_council_name_possessive
	}
	text = {
		trigger = {
			is_ruler = yes
		}
		localization_key = title_landed_name_possessive
	}
}

GetCouncilOrCourtPosition = { # Meant for title-less lowborns (Marshall, knights, artifiers, etc)
	type = character
	text = {
		trigger = { is_councillor = yes }
		localization_key = title_council_name
	}
	text = {
		trigger = { is_knight = yes }
		localization_key = relation_knight
	}
	text = {
		trigger = { has_any_court_position = yes }
		localization_key = petition_liege_title_position
	}
}

GetCapitalOrLiegeCapitalName = {
	type = character
	text = {
		trigger = {
			is_ruler = yes
		}
		localization_key = title_capital_name
	}
	text = {
		trigger = {
			is_ruler = no
		}
		localization_key = title_liege_capital_name
	}
}

MatriarchPatriarch = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = matriarch
	}

	text = {
		trigger = { is_female = no }
		localization_key = patriarch
	}	
}

GetMaPa = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = mother_ma
	}

	text = {
		trigger = { is_female = no }
		localization_key = father_pa
	}	
}

GetMamaPapa = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = mama
	}

	text = {
		trigger = { is_female = no }
		localization_key = papa
	}	
}

GetMaternalPaternal = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = maternal
	}

	text = {
		trigger = { is_female = no }
		localization_key = paternal
	}	
}

GetBrideGroom = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = spouse_bride
	}

	text = {
		trigger = { is_female = no }
		localization_key = spouse_groom
	}
}

GetFriendNoun = {
	type = character

	text = {
		localization_key = relation_chum
	}
	text = {
		localization_key = relation_pal
	}
	text = {
		trigger = {
			culture = { has_cultural_pillar = heritage_west_germanic }
		}
		localization_key = relation_mucker
	}
	text = {
		trigger = {
			is_male = yes
			culture = { has_cultural_pillar = language_arabic }
		}
		localization_key = relation_habibi
	}
	text = {
		trigger = {
			is_female = yes
			culture = { has_cultural_pillar = language_arabic }
		}
		localization_key = relation_habiba
	}
}

GetRivalNemesis = {
	type = character

	text = {
		trigger = { has_relation_nemesis = scope:second }
		localization_key = relation_nemesis
	}

	text = {
		trigger = { has_relation_rival = scope:second }
		localization_key = relation_rival
	}
}

GetFamilyRelationPlural = {
	type = character

	text = { # Sisters
		trigger = {
			scope:second = { is_female = yes }
			is_sibling_of = scope:second
		}
		localization_key = relation_sister_plural
	}

	text = { # Brothers
		trigger = { is_sibling_of = scope:second }
		localization_key = relation_brother_plural
	}

	text = { # Aunts
		trigger = {
			scope:second = { is_female = yes }
			is_nibling_of = scope:second
		}
		localization_key = relation_aunt_plural
	}

	text = { # Uncles
		trigger = { is_nibling_of = scope:second }
		localization_key = relation_uncle_plural
	}

	text = { # Nieces
		trigger = {
			scope:second = { is_female = yes }
			is_uncle_or_aunt_of = scope:second
		}
		localization_key = relation_niece_plural
	}

	text = { # Nephews
		trigger = { is_uncle_or_aunt_of = scope:second }
		localization_key = relation_nephew_plural
	}

	text = { # Daughters
		trigger = {
			scope:second = { is_female = yes }
			is_parent_of = scope:second
		}
		localization_key = relation_daughter_plural
	}

	text = { # Sons
		trigger = { is_parent_of = scope:second }
		localization_key = relation_son_plural
	}

	text = { # Granddaughters
		trigger = {
			scope:second = { is_female = yes }
			is_grandparent_of = scope:second
		}
		localization_key = relation_granddaughter_plural
	}

	text = { # Grandsons
		trigger = { is_grandparent_of = scope:second }
		localization_key = relation_grandson_plural
	}

	text = { # Great granddaughters
		trigger = {
			scope:second = { is_female = yes }
			is_great_grandparent_of = scope:second
		}
		localization_key = relation_granddaughter_plural
	}

	text = { # Great grandsons
		trigger = { is_great_grandparent_of = scope:second }
		localization_key = relation_grandson_plural
	}

	text = { # Grandmother
		trigger = {
			scope:second = { is_female = yes }
			is_grandchild_of = scope:second
		}
		localization_key = relation_grandmother_plural
	}

	text = { # Grandfather
		trigger = { is_grandchild_of = scope:second }
		localization_key = relation_grandfather_plural
	}

	text = { # Great grandfathers
		trigger = {
			scope:second = { is_female = yes }
			is_great_grandchild_of = scope:second
		}
		localization_key = relation_great_grandmother_plural
	}

	text = { # Great grandfathers
		trigger = { is_great_grandchild_of = scope:second }
		localization_key = relation_great_grandfather_plural
	}

	text = {
		trigger = { is_female = yes }
		localization_key = relation_kinswoman_plural
	}

	text = {
		trigger = { is_male = yes }
		localization_key = relation_kinsman_plural
	}
}

GetAuntUncle = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_aunt
	}

	text = {
		trigger = { is_male = yes }
		localization_key = relation_uncle
	}
}

GetNieceNephew = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_niece
	}

	text = {
		trigger = { is_male = yes }
		localization_key = relation_nephew
	}
}

GetAuntieUncle = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = relation_auntie
	}

	text = {
		trigger = { is_male = yes }
		localization_key = relation_uncle
	}
}

GetMumDad = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = mother_mum
	}

	text = {
		trigger = { is_female = no }
		localization_key = father_dad
	}	
}

StammerLetterMotherFather = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = stammer_m
	}

	text = {
		trigger = { is_female = no }
		localization_key = stammer_f
	}
}

GetYourConsortType = {
	type = character

	# Wife.
	text = {
		trigger = {
			is_female = yes
			is_spouse_of = scope:second
		}
		localization_key = consort_wife
	}
	# Husband.
	text = {
		trigger = {
			is_female = no
			is_spouse_of = scope:second
		}
		localization_key = consort_husband
	}
	# Betrothed.
	text = {
		trigger = { betrothed ?= scope:second }
		localization_key = consort_betrothed
	}
	# Concubinist.
	text = {
		trigger = { concubinist ?= scope:second }
		localization_key = consort_concubinist
	}
	# Concubine.
	text = {
		trigger = { is_concubine_of = scope:second }
		localization_key = consort_concubine
	}
	# Soulmate.
	text = {
		trigger = { has_relation_soulmate = scope:second }
		localization_key = consort_soulmate
	}
	# Lover.
	text = {
		trigger = { has_relation_lover = scope:second }
		localization_key = consort_lover
	}
	# They're just chambermates.
	## Fallback: should never be true.
	text = {
		trigger = { always = yes }
		fallback = yes
		localization_key = consort_good_friend
	}
}

# For affectionate gendered references by age — so children and much younger characters are girl/boy, else, woman/man.
GetWomanManGirlBoy = {
	type = character

	# Woman.
	text = {
		localization_key = CHARACTER_WOMAN
		trigger = {
			scope:second = {
				is_female = yes
				is_adult = yes
				age >= {
					value = root.age
					subtract = getwomanmangirlboy_age_threshold_value
				}
			}
		}
	}
	# Man.
	text = {
		localization_key = CHARACTER_MAN
		trigger = {
			scope:second = {
				is_male = yes
				is_adult = yes
				age >= {
					value = root.age
					subtract = getwomanmangirlboy_age_threshold_value
				}
			}
		}
	}
	# Girl.
	text = {
		localization_key = girl
		trigger = {
			scope:second = {
				is_female = yes
				is_adult = no
				age < {
					value = root.age
					add = getwomanmangirlboy_age_threshold_value
				}
			}
		}
	}
	# Boy.
	text = {
		localization_key = boy
		trigger = {
			scope:second = {
				is_male = yes
				is_adult = no
				age < {
					value = root.age
					add = getwomanmangirlboy_age_threshold_value
				}
			}
		}
	}
}

# Doesn't include the apostrophe so that you can capitalise or not as you wish.
GetErIm = {
	type = character

	text = {
		trigger = { is_female = yes }
		localization_key = abbreviated_er
	}

	text = {
		trigger = { is_female = no }
		localization_key = abbreviated_im
	}	
}
